package com.yan.demo.method;

public class MethodTest13 {
    public static void main(String[] args) {
        for (int i = 2; i <= 100; i++) {
            judgePrime(i);
        }
    }

    public static void judgePrime(int num) {
        boolean flag = true;
        for (int i = 2; i < num - 1; i++) {
            if(num % i == 0){
                flag = false;
                break;
            }
        }
        if(flag == true){
            System.out.print(num + " ");
        }
    }
}
